home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / x25 / nrs.shar.Z / nrs.shar / sendmail.SH < prev    next >
Encoding:
Text File  |  1990-04-27  |  1.8 KB  |  79 lines

  1. case $CONFIG in
  2.     '') . config.sh ;;
  3. esac
  4. outputfile=sendmail.cf
  5. rm -f $outputfile.$$
  6. echo "Creating $outputfile (with variable substitutions)"
  7. if cat >$outputfile.$$ <<!GROK!THIS!
  8. # RCSid[] = "@(#)$Header: sendmail.SH,v 3.2 87/03/26 08:28:03 pb Rel $"
  9. #
  10. ##################################################
  11. ##################################################
  12. ##############
  13. ############## configure for sendmail tables + domains
  14. ##############
  15. ##################################################
  16. ##################################################
  17.  
  18. # directory with nrs file in
  19. directory $datadir
  20.  
  21. # enable tracing
  22. verbose 1
  23.  
  24. # output format
  25. output short sendmail
  26.  
  27. # only want connections on JANET in the MAIL-NIFTP context
  28. context MAIL janet
  29. context MAIL pss
  30.  
  31. # filter this file through macro expander
  32. comment hdr.file
  33.  
  34. # Cheat a bit -- where to put the abbreviated info (if wanted)
  35. filedmn    abbrev.dom    -abbrev.dom-
  36.  
  37. # We want the domain gateway tables -- output file is top.dom
  38. domains
  39. filedmn    top.dom        -top.dom-
  40.  
  41. # now the domains & files - order is critical.
  42. #    the file    the short dmn    the long dmn
  43. # AUTOMATIC local tailoring
  44. #   end of  local tailoring
  45. # The academic comunity domain
  46. filedmn ac.dom        uk.ac.
  47. filedmn uk.dom        uk.
  48.  
  49. # Just stuff the junk elsewhere .. /dev/null ??
  50. filedmn junk.dom
  51.  
  52. # And now for the channel tables (i.e. Application Relays)
  53. # Sigh ..... sendmail UK-1.4 always assumes janet.chn ...
  54. filechan janet.chn    janet
  55. filechan janet.chn    pss
  56. !GROK!THIS!
  57. then
  58.     : OK
  59. else
  60.     echo "    " Failed to create $outputfile.$$
  61.     exit 1
  62. fi
  63. if [ -r tailor ]
  64. then ed - $outputfile.$$ << EOF
  65.     /AUTOMATIC local tailoring/r tailor
  66.     w
  67. EOF
  68. fi
  69. if cmp $outputfile $outputfile.$$ > /dev/null 2>& 1
  70. then
  71.     rm -f $outputfile.$$
  72.     echo "    " $outputfile not affected
  73. elif mv $outputfile.$$ $outputfile
  74. then
  75.     echo "    " $outputfile updated
  76. else
  77.     echo "+++    " $outputfile left in $outputfile.$$
  78. fi
  79.